﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using OC.Common.Entity;

namespace OC.Common.Interface
{
    public interface IDictionary
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="where"></param>
        /// <param name="start"></param>
        /// <param name="limit"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        Dictionary<string, List<string>> GetAllList(string type);

        IList GetUserByUserIDs(List<string> userIds);
        IList GetUserOrganizationByUserID(string userID);
        IList GetDictionaryByIDs(List<string> dicIds);
        /// <summary>
        /// 根据字典关系类型获取字典关系
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        IList GetDictionaryRelationByRelation_Type(string type, string dicID);

        /// <summary>
        /// 根据字典类型获取字典数据
        /// </summary>
        /// <param name="where"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        IList GetListByDictionaryType(string where,string type);

        DictionaryEntity Get(string dicId);

        /// <summary>
        /// 根据字典ID删除字典数据
        /// </summary>
        /// <param name="dicID"></param>
        /// <returns></returns>
        bool DeleteDictionaryByID(string dicID);

        /// <summary>
        /// 根据字典ID和角色名获取用户,角色名称使用模糊查询
        /// </summary>
        /// <param name="dicIDs"></param>
        /// <param name="userName"></param>
        /// <returns></returns>
        IList GetUserByDictionaryID(List<string> dicIDs,string userName);


        /// <summary>
        /// 根据父ID获取字典表中数据
        /// </summary>
        /// <param name="parentId"></param>
        /// <returns></returns>
        IList GetList(string parentId);

        void InsertDictionaryRelation(List<DictionaryRelationEntity> entitys);
        void InsertDictionary(DictionaryEntity entity);
        void UpdateDictionary(DictionaryEntity entity);

        bool Exists(string taskId);

        void DeleteRelationDictionaryByID(string taskIds, string type);
    }
}
